<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <asset:link rel="stylesheet" href="layui/css/layui.css"/>
</head>

<body>

<div style="width:30%;margin: 15% auto;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>登录</legend>
    </fieldset>

    <form class="layui-form" action="${createLink(controller: "login",action: "authenticate")}" autocomplete="off" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>

            <div class="layui-input-block">
                <input type="text" name="username" lay-verify="required" autocomplete="off" placeholder="请输入用户名"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>

            <div class="layui-input-block">
                <input type="text" name="password" lay-verify="required|password" placeholder="请输入密码" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">验证码</label>

            <div class="layui-input-inline">
                <input type="text" name="verifyCode" lay-verify="required" placeholder="请输入验证码" autocomplete="off"
                       class="layui-input">
            </div>
            <div class="layui-word-aux">
                <img src="${createLink(controller:"verifyCode",action: "index")}" style="cursor:pointer" onclick="this.src='${createLink(controller:"verifyCode",action: "index")}?x='+Date.now()"/>
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="" lay-filter="demo2">登录</button>
        </div>
    </form>
</div>

<asset:javascript src="layui/layui.js"/>
<script>
    layui.use(["jquery","element","layer","form"],function () {
        var $ = layui.$,element = layui.element,layer = layui.layer,form = layui.form;

    });
</script>
</body>
</html>